#include<bits/stdc++.h>
using namespace std;

const int MAX_SIZE = 100;
int n, m;
bool visited[MAX_SIZE][MAX_SIZE];


const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};

bool solve(int aa[][MAX_SIZE]) {
    stack<pair<int, int>> s;
    s.push({0, 0});
    visited[0][0] = true;

    while (!s.empty()) {
        int na = s.top().first;
        int ma = s.top().second;
        s.pop();

        if (na == n - 1 && ma == m - 1) {
            return true;
        }


        for (int dir = 0; dir < 4; dir++) {
            int new_na = na + dx[dir];
            int new_ma = ma + dy[dir];

            if (new_na >= 0 && new_na < n && new_ma >= 0 && new_ma < m &&
                aa[new_na][new_ma] == 0 && !visited[new_na][new_ma]) {
                s.push({new_na, new_ma});
                visited[new_na][new_ma] = true;
            }
        }
    }

    return false;
}

int main() {
    char a;
    scanf("%d %d", &n, &m);
    int aa[MAX_SIZE][MAX_SIZE];
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
            scanf(" %c", &a);
            if (a == '#') {
                aa[i][j] = 1;
            } else {
                aa[i][j] = 0;
            }
        }
    }

    if (solve(aa)) {
        printf("Yes\n");
    } else {
        printf("No\n");
    }

    // system("pause"); // 注释掉，避免在某些环境中影响输出
    return 0;
}